﻿using BusinessObjects.Entities;

namespace BusinessObjects.Mappings
{
    public sealed class PersonMap : EntityMapping<PersonEntity, int>
    {
        public PersonMap()
        {
            Table("Persons");
            Map(x => x.Name).Not.Nullable();
            Map(x => x.BirthDate).Not.Nullable();
            References(x => x.Address).Cascade.All().Nullable();
        }
    }
}